package com.cloud.code.真题;

public class Demo32 {

    public static void main(String[] args) {
        for (int i = 0; i < 1000; i++) {
            char[] chars = String.valueOf(i).toCharArray();

            int count = chars.length;

            int sum = 0;
            for (int j = 0; j < count; j++) {
                sum = sum + (int) Math.pow(Character.getNumericValue(chars[j]), count);
            }

            if (i == sum) {
                System.out.println(i);
                System.out.println("yes");
            } else {
            }

        }

    }
}
